<?php
namespace app\index\controller;
use think\Db;
use think\Controller;
use  think\Request;

class Menu extends Controller
{
    
	public function Index(){
		
		
		
		if($_POST){
			
			
		}
		$where="";
		
		 return view();
	}
	
	
	
	
	
	 public function GetMenuList(){
		 $request = Request::instance();
		 $parentid="0";
		 if($request->post("parentid")){
			 $parentid=$request->post("parentid");
			 
		 }
		 
		 $userid = session("userid");
		 $manage = db("manage")->where("id=".$userid)->find();
		 $jiaoseinfo = db("sys_jiaose")->where("id=".$manage["jiaoseid"])->find();
		 $quanxian = $jiaoseinfo["quanxian"];
		 $where="parentid=".$parentid." and LOCATE(valuestr,'".$quanxian."')!=0";
		$list = db('sys_menu')->where($where)->order("seq asc")->select();
	
		return json($list);
		
	}
	
}
